function [m_N,p_top,p_bottom] = pole_cyl(m_cyl,cyl_a,l_bar,p_c,cyl_n,cyl_k)

num_s = 1;
for sm = 1:(cyl_k+1);
    pr_bar = cyl_a/(cyl_k+1)*(sm-1);

    if sm==1
        mloop = 1;
    else
        mloop = cyl_n;
    end
    
    for k = 1:mloop
        theta_ms = 2*pi/mloop*(k-1);
        
        p_top(:,num_s) = [pr_bar*cos(theta_ms) pr_bar*sin(theta_ms) p_c+l_bar/2]';%stator
        p_bottom(:,num_s) = [pr_bar*cos(theta_ms) pr_bar*sin(theta_ms) p_c-l_bar/2]';
        m_N(num_s) = m_cyl(sm);
        num_s = num_s+1;
    end
end